/*
Another game of life with SDL renderer.
Copyright (C) 2009-2010  Julien CLEMENT (andematunum@gmail.com)
*/
/*
	This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _MatrixRenderer_h_
#define _MatrixRenderer_h_

// Forward declarations
class Matrix;

// Abstract class for rendering the life matrix
class MatrixRenderer {
	public:
		// A renderer takes each cell of the matrix and renders it with
		// a rectangle of size rw x rh
		// For a non-color version, use the rgb color for rendering alive cells.
		// Else, the color of the cell will be used.
		// The default color is 255,255,255 (white)
		MatrixRenderer (Matrix * matrix, unsigned int rw, unsigned int rh, unsigned int r=255, unsigned int g=255, unsigned int b=255);
		virtual void render (void) = 0;

	protected:
		Matrix * _matrix;

		unsigned int _w;
		unsigned int _h;
		unsigned int _r;
		unsigned int _g;
		unsigned int _b;
};

#endif

